package com.chenyun.common.vo;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * 省市区vo
 * @author: Lonni
 * @date: 2022/7/6 0006 16:16
 */
@Data
@Builder
public class AreaVo {

    private List<Province> provinces;
    /**
     * 当单独查询是存在
     */
    private List<City> cityList;
    /**
     * 当单独查询是存在
     */
    private List<Region> regions;

    @Data
    @Builder
    public static class Province{
        private String code;
        private String name;
        private List<City> citys;
    }

    @Data
    @Builder
    public static class City{
        private String code;
        private String name;
        private String provinceCode;
        private List<Region> regions;
    }

    @Data
    @Builder
    public static class Region{
        private String code;
        private String name;
        private String provinceCode;
        private String cityCode;
    }

    @Data
    @Builder
    @NoArgsConstructor
    @AllArgsConstructor
    public static class AreaTree{
        private String value;
        private String label;
        private List<AreaTree> children;


    }
}
